package com.allwees.data.dataport.module.useraction.util;

import com.allwees.core.common.util.encrypt.DES;
import com.allwees.core.common.util.http.UrlUtil;
import lombok.extern.slf4j.Slf4j;

/**
 * @author yangylsky
 */
@Slf4j
public class EdmEncryptor {

	private static final String SEED = "nothing and nothing..i know nothing..";
	/**
	 * 加密
	 *
	 * @param content
	 * @return
	 */
	public static String encrypt(String content) {
		return UrlUtil.encodeUrl(DES.encrypt(content, SEED));
	}

	/**
	 * 解密
	 *
	 * @param content
	 * @return
	 */
	public static String decrypt(String content) {
		return DES.decrypt(UrlUtil.decodeUrl(content), SEED);
	}
}
